﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Eksponent.CropUp
{
    public enum CropUpMode
    {
        BestFit = 0,
        Max = 1,
        Pad = 2,
        Min = 3,
        Responsive = 3
    }

    public static class CropModeHelper
    {
        public static CropUpMode FromString(string key)
        {
            return key == "M" ? CropUpMode.Max : key == "P" ? CropUpMode.Pad : key == "R" ? CropUpMode.Responsive : CropUpMode.BestFit;
        }

        public static string ToString(CropUpMode cropMode)
        {
            return cropMode == CropUpMode.Max ? "M" : cropMode == CropUpMode.Pad ? "P" : cropMode == CropUpMode.Responsive ? "R" : "F";
        }
    }

}
